package com.example.lzy.listviewsample.com.example.lzy.listviewsample.zdy;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ListView;

import com.example.lzy.listviewsample.R;

public class CustomArrayAdapterActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.custom_arrayadapter_layout);

        ListView listView = (ListView) findViewById(R.id.listview);

        String[] string = {"a5646564","qwreq6564","a5646564","rts646564","646564","a5646564","ty46564"};

        MyArrayAdapter myAdapter = new MyArrayAdapter(this,R.layout.custom_arrayadapter_item,string);
        listView.setAdapter(myAdapter);
    }
}
